<include file="../header" />
<body class="J_scroll_fixed">
        
<form class="well form-search" method="post" style="float:left;width:100%;" action="{:U('promotion/index')}">
    <div class="search_type cc mb10">
        <div class="mb10">
        <span class="mr20">
                    店铺名称：
        <input type="text" name="shopName" class="input" value="{$shopName}" />
                    促销状态：{:getEnumSelectWidget($promotionStatus, 'status', $status, 1)}
            <button class="btn btn-primary">搜索</button>
            <a class="btn" href="{:U('promotion/index')}">重置</a>
                    
        </span>
        </div>
    </div>
</form>
<div class="wrap J_check_wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:U('promotion/add')}">添加促销</a></li>
    </ul>
    <table class="table table-hover table-bordered">
        <thead>
        <tr>
            <th>编号</th>
            <th>活动名称</th>
            <th>店铺名称</th>
            <th>状态</th>
            <th>创建时间</th>
            <th>开启时间</th>
            <th>截止时间</th>
            <th>折扣</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <foreach name="list" item="vo">
            <tr>
                <td>{$vo.promotion_id}</td>
                <td>{$vo.promotion_name}</td>
                <td>{$vo.shop_name}</td>
                <td>{:getEnumString($promotionStatus, $vo['status'])}</td>
                <td>{$vo.create_time}</td>
                <td>{$vo.begin_time}</td>
                <td>{$vo.end_time}</td>
                <td>{$vo.discount}折</td>
                <td>
                    <if condition="$vo['status'] eq $promotionStatus['WAITING'] or $vo['status'] eq $promotionStatus['START']">
                    <a href='{:U("promotion/edit",array("id"=>$vo["promotion_id"]))}'>修改</a> 
                    <a class="J_ajax_del" href="{:U('promotion/abandon',array('id'=>$vo['promotion_id']))}">作废</a>
                    </if>
                </td>
            </tr>
        </foreach>
        </tbody>
    </table>
    <div class="pagination">{$page}</div>
</div>
<script src="__ROOT__/statics/js/common.js"></script>
</body>
</html>